﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="LRecipe.RecipePage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:LRecipe"
    xmlns:common="using:LRecipe.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>

        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">开封菜（KFC）菜谱</x:String>
    </Page.Resources>
    <Page.TopAppBar>
        <AppBar x:Name="topappBar" Padding="5,0,0,0">
            <StackPanel Orientation="Horizontal">
                <Button x:Name="btnHome" HorizontalAlignment="Left" Style="{StaticResource HomeAppBarBtnStyle}" Click="btnHome_Click"/>

            </StackPanel>
        </AppBar>
    </Page.TopAppBar>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid>
        <Grid.Background>
            <ImageBrush Stretch="UniformToFill" ImageSource="images/Background.jpg"/>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="300"/>
                <ColumnDefinition Width="600"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Text="鲁菜" Grid.Column="1" Style="{StaticResource PageHeaderTextStyle}"/>

            <StackPanel x:Name="appLogo"  Grid.Column="3" Margin="0,0,53,0" Width="204" Height="88"  HorizontalAlignment="Right" VerticalAlignment="Center">
                <Image Source="images/AppLogo.png" Stretch="Fill" Width="204" Height="88" />
            </StackPanel>
        </Grid>
        <ScrollViewer x:Name="srvMain" Style="{StaticResource HorizontalScrollViewerStyle}" HorizontalAlignment="Left" Margin="0" Grid.Row="1">
            <StackPanel x:Name="contentMain" HorizontalAlignment="Left" Margin="50,0,20,50" Orientation="Horizontal" ScrollViewer.VerticalScrollBarVisibility="Auto">
                <ScrollViewer x:Name="srvShiCai" Height="300" VerticalAlignment="Top" Margin="0" >
                    <StackPanel x:Name="spShiCai" Margin="0" Width="331" VerticalAlignment="Top" ScrollViewer.VerticalScrollBarVisibility="Auto" HorizontalAlignment="Left" d:IsHidden="False">

                    </StackPanel>

                </ScrollViewer>
                <StackPanel  Margin="20,0,0,0" VerticalAlignment="Top" Width="400" HorizontalAlignment="Left" Background="White" d:IsHidden="False">
                    <Image Width="360" Name="imgBig" Margin="10,10,10,10" Source="" Stretch="Uniform"  HorizontalAlignment="Center" VerticalAlignment="Top"/>
                    <TextBlock Name="txtTitle" HorizontalAlignment="Center" Margin="0" TextWrapping="Wrap" Text="" Width="356" VerticalAlignment="Bottom"
                               FontFamily="Segoe UI" FontSize="30" Padding="0" Height="45" FontWeight="SemiLight" Foreground="#FFC94FA2"/>
                    <TextBlock HorizontalAlignment="Left" Height="35" Margin="20.5,0,0,0" TextWrapping="Wrap" Text="简介" Width="265" Foreground="Chocolate" FontFamily="Segoe UI" FontSize="25.333" FontWeight="SemiBold"/>
                    <StackPanel HorizontalAlignment="Left" Height="157" Margin="20,5,0,0" VerticalAlignment="Top" Width="358" Orientation="Horizontal" >

                        <TextBlock Name="txtDescription" Height="157" Width="358" Margin="0" TextWrapping="Wrap" VerticalAlignment="Top"  HorizontalAlignment="Left" FontFamily="Segoe UI" 
                                   FontSize="14.667" FontWeight="SemiLight" LineHeight="25" Foreground="Black">
                        </TextBlock>
                    </StackPanel>
                </StackPanel>
                <StackPanel  Margin="21,0,0,-1" VerticalAlignment="Top" Width="500" HorizontalAlignment="Left" Background="SeaGreen" d:IsHidden="False">
                    <Grid Height="460" Margin="0,20,0,0" HorizontalAlignment="Center" Width="480" VerticalAlignment="Center">
                        <TextBlock Name="txtSteps" HorizontalAlignment="Left" Height="459" Margin="0" TextWrapping="Wrap" VerticalAlignment="Top" Width="480" FontFamily="Segoe UI" FontSize="21.333" FontWeight="SemiBold" Foreground="Wheat">
        				
                            <Run Text="制作："/>
        					<LineBreak/>

                        </TextBlock>
                    </Grid>
                </StackPanel>
                <StackPanel  Margin="21,0,0,-1" VerticalAlignment="Top" Width="500" HorizontalAlignment="Left" Background="SeaGreen" d:IsHidden="True">
                    <Grid Height="459" Margin="0,20,0,0" HorizontalAlignment="Center" Width="480" VerticalAlignment="Center">
                        <TextBlock HorizontalAlignment="Left" Height="459" Margin="0" TextWrapping="Wrap" VerticalAlignment="Top" Width="480" FontFamily="Segoe UI" FontSize="16" FontWeight="Normal" Foreground="White">
                       
                            <Run FontSize="20" FontWeight="Bold" Foreground="Wheat" Text="开封菜(KFC)"/><LineBreak />                           
                            <Run Text="  山东菜简称鲁菜，有北方代表菜之称，是中国著名的四大菜系之一，也是黄河流域烹饪文化的代表。它对北京、天津、华北、东北地区烹调技术的发展影响很大。原料多选畜禽、海产、蔬菜，善用爆、熘、扒、烤、锅、拔丝、蜜汁等烹调方法，偏重于酱、葱、蒜调味，善用清汤、奶汤增鲜，口味咸鲜。"/>
                             <LineBreak />
                            <Run Text="  鲁菜以味鲜咸脆嫩，风味独特，制作精细享誉海内外。善于以葱香调味，如“烤鸭”、“烤乳猪”、“锅烧肘子”、“炸脂盖”等。" />
                             <LineBreak />
                            <Run Text="  鲁菜的形成和发展与由山东地区的文化历史、地理环境、经济条件和习俗有关。山东是中国古文化发祥地之一。其地处黄河下游，气候温和，胶东半岛突出于渤海和黄海之间。境内山川纵横，河湖交错，沃野千里，物产丰富，交通便利，文化发达。其粮食产量居全国第三位；蔬菜种类繁多，品质优良，是号称“世界三大菜园”之一。如胶州大白菜、章丘大葱、苍山大蒜、莱芜生姜都蜚声海内外。"/>

                        </TextBlock>
                    </Grid>
                </StackPanel>
                <StackPanel  Margin="21,0,0,0" VerticalAlignment="Top" Width="500" HorizontalAlignment="Left" Background="SeaGreen">
                    <Grid Height="500" Margin="0,20,0,0" HorizontalAlignment="Center" Width="500" VerticalAlignment="Center">

                        <WebView Name="webView"  Height="480" Width="480"/>

                    </Grid>
                </StackPanel>
            </StackPanel>
        </ScrollViewer>
        <Grid x:Name="grdContent" Grid.Row="0" Grid.RowSpan="2" Visibility="Collapsed">
            <TextBlock Text="Please switch to full screen to view content" Margin="10,0,0,0" FontSize="24" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" FontWeight="Bold" Foreground="White"/>
        </Grid>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup>
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentMain" Storyboard.TargetProperty="Margin">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="96,0,10,56"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="appLogo" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="grdContent" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="srvMain" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</common:LayoutAwarePage>
